package com.hzlx.controller;

import com.hzlx.service.BusinessInfoService;
import com.hzlx.service.impl.BusinessInfoServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 86166
 * @version 1.0
 * @description: TODO
 * @date 2023/4/11 16:04
 */
@WebServlet(urlPatterns = "/takeOrder.do")
public class BusinessTakeOrderController extends HttpServlet {
    private BusinessInfoService businessInfoService = new BusinessInfoServiceImpl();
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
       resp.setHeader("Content-Type","text/html;charset=UTF-8");
        System.out.println(businessInfoService.takeOrder(req));
        resp.getWriter().write(businessInfoService.takeOrder(req));
    }
}
